package com.yicong.ants;

import android.Manifest;

import com.cchao.simplelib.core.UiHelper;
import com.yicong.ants.manager.config.ZzConfigs;

/**
 * App常量工具类
 */
public interface Constants {

    int PAGE_SIZE = 10;
    int PAGE_SIZE_20 = 20;
    String PAGE_SIZE_Str = "10";
    String PAGE_SIZE_20_Str = "20";

    //<editor-fold desc="字符串">
    String DEBUG = "蚁丛-Android";
    String DATA_EXCEPTION = "数据异常";
    String NETWORK_EXCEPTION = "网络异常";

    String Api_Product = "https://api.cqyicongkeji.com";
    String Api_Line = "http://travel_api.yblylm.com";
    String Api_Line_Dev = "http://api.line.dev.yctourism.com";

    /**
     * 定位所需权限
     */
    String[] LOCATION = new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,
            Manifest.permission.ACCESS_FINE_LOCATION,
            Manifest.permission.WRITE_EXTERNAL_STORAGE,
            Manifest.permission.READ_EXTERNAL_STORAGE,
            Manifest.permission.READ_PHONE_STATE};
    /**
     * 定位所需权限
     */
    String[] LOCATION2 = new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,
            Manifest.permission.ACCESS_FINE_LOCATION};


    /**
     * 照片相机权限
     */
    String[] CAMERA_PHOTO2 = new String[]{
            Manifest.permission.CAMERA};

    String[] CAMERA_PHOTO = new String[]{
            Manifest.permission.CAMERA,
            Manifest.permission.WRITE_EXTERNAL_STORAGE,
            Manifest.permission.READ_EXTERNAL_STORAGE,
            Manifest.permission.INTERNET};
    /**
     * 读写权限
     */
    String[] READ_WRITE = new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE,
            Manifest.permission.READ_EXTERNAL_STORAGE};
    //</editor-fold>
    /**
     * 取票标示
     */
    String IMG = "img";
    String S = "O0";
    /**
     * 微信 ID
     */
    String WeChatId = UiHelper.getString(R.string.key_wx_app);
    /**
     * 错误H5页面显示
     */
    String ERROR_HTML = "file:///android_asset/404.html";

    /**
     * 数据获取成功
     */
    String DATA_SUCCESS = "2000";
    /**
     * 读取超时
     */
    int READ_TIME_OUT = 3000;
    /**
     * 连接超时
     */
    int CONN_TIME_OUT = 3000;
    /**
     * 写入超时
     */
    int WRITE_TIME_OUT = 3000;
    /**
     * 获取值时获取到 null ,设置为默认值，防止闪退
     */
    String NO_NULL = "";
    /**
     * 测试服 http://app.yytxlyw.com/api/v1/
     * 正式服 http://test.yytxlyw.com/api/v1/
     */
    String BASE_URL = ZzConfigs.mGlobalApi + "/api/v1/";
//    private static final String BASE_URL = "http://app.yytxlyw.com/api/v1/";
    /**
     * 城市列表
     */
    String CITY_LIST = BASE_URL + "scenic/getCity";
    /**
     * 全国景区列表
     */
    String NATIONAL_SCENIC_SPOTS_LIST = BASE_URL + "senic/allsenic";

    /**
     * 支付订单
     */
    String PAY_ORDERS = BASE_URL + "order/payment";
    /**
     * 点赞新闻
     */
    String LIKE_NEWS = BASE_URL + "article/article_zan";
    /**
     * 我的订单页面调起支付的接口
     */
    String PAY_OF_ORDER = BASE_URL + "order/payment";
    /**
     * 上传富文本
     */
    String UPLOAD_RICH_TEXT = BASE_URL + "article/users_article_operation";

    interface Config {
        String AdminPwd = "a1234567";
        String Authorization = "Authorization";
    }

    interface RequestCode {
        int TAKE_IMAGE = 12;
        int TAKE_BY_CAMERA = 22;
        int TAKE_BY_ALBUM = 32;
    }

    interface HttpCode {
        String CODE_2000 = "2000";
    }

    interface Keys {
        String noncestr = "noncestr";
        String timestamp = "timestamp";
    }

    interface Req_Code {
        int Install_App_Permission = 10086;
    }

    interface Container {
        String AppointHistory = "appointHistory";
        String CollectBox = "CollectBox";
        String CardHistory = "CardHistory";
        String StarShare = "StarShare";
        String CircleAd = "CircleAd";
    }

    interface Extra {
        String Id = "Id";
        String Uid = "uid";
        String Vid = "Vid";
        String Project_Id = "Project_Id";
        String Sys_Project_Id = "Sys_Project_Id";
        String Code = "code";
        String JSON = "json";
        String Name = "name";
        String Url = "url";
        String Type = "type";
        String Category = "Category";
        String Discount = "discount";
        String Title = "title";
        String Fragment = "fragment";
        String Index = "index";
        String Search = "search";
        String Project_Name = "Project_name";
        String Project = "project";
        String Price = "price";
        String Scenic_Type = "Scenic_Type";
        String Ordersn = "ordersn";
        String JSON2 = "json2";

        String IsCollect = "IsCollect";
        String Visit_Time = "Visitor_Time";
        String RecommendType = "Recommend_Type";
        String RecommendMember = "Recommend_member";
        String RecommendUser = "Recommend_user";
        String To_Auth = "To_Auth";
        String IsDirect = "IsDirect";
        String Number = "No";
        String Content = "Content";
        String Card_Type = "Card_Type";
        String Portal = "portal";
        String Have_Set_Pay_Pwd = "Have_Set_Pay_Pwd";
        String Yc_Web_View_Can_Share = "Yc_Web_View_Can_Share";
        String Video_isFocus = "Video_Index_isFocus";
        String VIDEO_LIST = "video_list";
        String VIDEO_LIST_INDEX = "video_list_index";
        String Time_Start = "time_start";
        String Time_End = "time_end";
        String KEYWORDS = "keywords";
        String PROVINCE = "province";
        String COUNTDOWN = "Countdown";
    }

    interface Event {
        int Splash_Show = 11;
        int Splash_Over = 10;
        int Ad_Click_Tip = 16;
        int Update_Me_Info = 100;
        int Main_Tab_Turn = 101;
        int Main_Activity_Result = 20;
        int Scan_Manual = 210;
        int Login_Suc = 300;
        int update_address = 400;
        int Reimburse_Suc = 500;
        int Bind_Suc = 600;
        int Meitu_Bind_Suc = 700;
        int Pay_Result_Turn = 800;
        int Pay_Result_Suc = 4000;
        int Pay_Result_Fail = 4010;
        int Login_Out = 900;
        int To_Auth = 950;
        int Bio_Auth = 960;
        int Auth_Suc = 970;
        int NO_AD_FINAL = 980;

        int Update_Order = 1000;
        int Update_Income_Info = 1100;
        int Update_My_Card_Info = 1200;

        int Ad_Full_Complete = 2010;
        int Ants_Ad_Complete = 2100;
        int Ants_Ad_Complete_For_News = 2200;

        int Expect_Refresh_Dashboard = 3020;
        int Expect_Refresh_Circle_Ad = 3030;
        int Expect_Refresh_Manager_Ad = 3040;

        int Circle_Ad_Html_Suc = 5000;
        int Circle_Aritcle_Suc = 5050;
        int Circle_Journal_Suc = 5060;
        int Circle_Journal_Poi = 5080;
        int Main_Tab_Checked = 6000;

        int Config_Update = 40001;
        int Refresh_Dashboard_Fail = 40002;
        int Refresh_Video_List = 40003;
        int Focus_List_Result = 40004;
        int Real_Check_Suc = 40102;
        int Video_Follow_Update = 40014;
        int Video_Commit_Suc = 40112;
        int Ant_Link_Copy = 40312;
        int Sign_List_Update = 50312;
        int Video_Del_Update = 60002;
        int To_Vide = 60003;
        int ENTER_ROOM = 1959392;
    }

    interface Prefs {
        String USER_INFO = "user_info";
        String DEV_MODE_CLICK = "DEV_MODE_CLICK";
        String Dev_Api = "dev_api";
        String Access_Dev_Mode = "access_dev_mode";
        String Visitor_History_Input = "Visitor_History_Input";
        String Index_Info = "Index_Info";
        String Task_Ad_Play_Date = "Task_Ad_Play_Date";
        String Task_Ad_Play_Times = "Task_Ad_Play_Times";
        String Last_Notice_Showed_Id = "Last_Notice_Showed_Id";
        String Last_Activity_Showed_Id = "Last_Activity_Showed_Id";
        String Red_Badge_3 = "Red_Badge_3";
        String Red_Badge_5 = "Red_Badge_5";
        String Red_Badge_6 = "Red_Badge_6";
        String Energy_Ad_Tip = "Energy_Ad_Tip";
        String Location_Info = "Location_Info";
        String Circle_Ad_Draft = "Circle_Ad_Draft";
        String Circle_Article_Draft = "Circle_Article_Draft";
        String Circle_Guide_Top = "Circle_Guide_Top";
        String Circle_Content_Publish_Tip = "Circle_Content_Publish_Tip";
        String Task_Disclaimer_Tip = "Task_Disclaimer_Tip";
        String Clipboard_links_routed_before = "Clipboard_links_routed_before";//之前路由过的剪切板链接
        String Vids = "Vids";//看过的视频的vid
        String Video_Comment_Tip = "Video_Comment_Tip";
        String Reward_Video_Channel = "Reward_Video_Channel";
        String Last_Task_Disclaimer_Time = "Last_Task_Disclaimer_Tip";
        String Task_Disclaimer_Times = "Task_Disclaimer_Times";
        String splash_image = "splash_image";
        String task_step = "task_step";
        String task_step1 = "task_step1";
        String task_step2 = "task_step2";
        String task_step3 = "task_step3";
        String task_step4 = "task_step4";
    }

    interface Rout {
        String bind_card = "bind_card";
    }

    interface Utm {
        String source = "utm_source";
        String content = "utm_content";
    }

    interface Activity_Req_Code {
        int Scan = 23409;
    }

    interface Resp_Code {
        String No_Auth = "4012";
    }

    interface Test_Resp {
        String page_resp = "{\"code\":2000,\"msg\":\"数据获取成功\",\"data\":{\"pageInfo\":{\"curPage\":%1$s,\"nextPage\":2,\"countPage\":3},\"list\":[]}}";
        String image = "http://qiniu.yytxlyw.com/uploads/20190308/Fqp-ktWWpc3W-sHN48FUa3AhFqWs.jpg";
        String qr_code = "https://test.yytxlyw.com/api/v1/myqrcode/code?code=19199997";
    }

    interface Api_Path {
        String NewsCollect = "article/article_collection_list";
        String NewsCommon = "article/all";
    }

    interface Scenic_Type {
        String All = "0";
        // 特惠
        String DiscountScenic = "10";
        // 预约
        String AdvanceScenic = "20";
        // 免预约
        String PartnerScenic = "30";
        // 门票免费景区
        String FreeScenic = "32";
        // 门票无资源景区
        String PowerlessScenic = "35";
        // 免费景区
        String FreeScenicType = "100";
        // 预约+免预约景区
        String SetPartnerAdvance = "110";
        // 预约景区=（特惠+预约）
        String SetAdvanceScenic = "120";
    }

    interface Url {
        String Favicon_Image = "http://api.yctourism.com/favicon.ico";
        String Route_App_prefix = "ants";
        String Route_App_Url = "ants://platform/app";
    }

    String Base_Url = ZzConfigs.getApi();
    String Web_Base_Url = Base_Url + "/api/v2/web/";
    String Web_Project_Url = "http://project.m.yctourism.com";
    String Customer_Chat = "https://yzf.qq.com/xv/web/static/chat/index.html?sign=37ef9b9781770792271098ec1de6b230d6b64081321a619c61b6c0452d83df24a0cae2d632cc148e0f9fc21747d57b103ba3b872";

    // GEETEST 一键登录
    String GeeTestID = "1fd36beff941c437a5d497a381c102ba";

    /**
     * 获取 web url
     *
     * @param key key
     */
    static String getWebUrl(String key) {
        return ZzConfigs.getWebUrl(key).getUrl();
    }

    String YChat_package_name = "com.x.ychat";
    String YChat_Activity = "com.x.ychat.ui.chat.GroupListActivity";
    String YChat_Action = "yChat_Action";
}
